package com.xur.springboot.service.impl;

import com.xur.springboot.entity.Companies;
import com.xur.springboot.mapper.CompaniesMapper;
import com.xur.springboot.service.CompaniesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompaniesServiceImpl implements CompaniesService {

    @Autowired
    private CompaniesMapper CompaniesMapper;


    @Override
    public List<Companies> queryAllCompanies() {

        return this.CompaniesMapper.queryCompanies();
    }

    @Override
    public List<Companies> queryComByCom_id(int com_id) {
        return CompaniesMapper.queryComByCom_id(com_id);
    }

    @Override
    public List<Companies> searchCompanies(String keyword) {
        return CompaniesMapper.selectByKeyword(keyword);
    }
}